Home

JustABeginning

View on GitHub

Published: Fri, Jul 24, 2026

Modified: Sat, Aug 15, 2026

Damn Vicious Web Access

A phrase inspired from DVWA, but the current discussion has nothing to do with penetration testing. Recently, I had been suffering from immense frustration with my internet connectivity (fuck ISP! fuck!!), and only after quite a long time was I able to figure out what was the problem! An erroneous NAT64 translation at the ISP end, barring me from accessing certain IPv4-only sites (GitHub, Reddit, to name a few!). To get a comprehensive view of how an ISP provided IPv6-only (primarily) network works, one can refer Jio 5G - IPv6 only on transport.

Workaround

The simplest one would be to use a functional DNS64/NAT64 translation. To understand how this works, help yourself:

:clap: Hats off to the following public NAT64/DNS64 service providers:

You can have your own BIND9, with a grain of DoT/DoH!

The Hard Way!

For privacy concerns (hehe, boi!), and to “seemingly” convert the damn IPv6-only to IPv4-only stack, I decided to setup a VPN. Now, where to get a remote machine to host it? seriously! where?? I don’t know why I chose Google Cloud, mostly because I wasn’t able to create an Oracle Cloud free tier account (still not able to figure out, like WTF is wrong with their card verification system? fuck!!), and I was looking for some kind of always free quota! (sorry! AWS, Azure)

Setup

Fuck No!

Oh yeah! the hair tearing begins! Everything seems to be on track – VPC, Firewall, VM, sysctl (yes! just miss setting net.ipv4.ip_forward = 1, and see what a slicky ass MF it is!), WireGuard, everything configured, every syntax correct! and then, bam!! a hit right in the face! A refreshing ping from IPv4-only nic0 and, a straight “fuck you!” from the dual-stack IPv6-address beholder nic1. Give up! right? since, at this point, what was even the point of doing all this shit! in the first place? Maybe, I would have …, hadn’t I stumbled across x-yuri’s answer. So, with post-nut clarity, I began:

Multi-Layer

The first time I executed warp-cli connect with WARP (sounds more like, “Now from the top, make it drop, that’s some WAP …”, hehe, just kidding!), I was kicked out of my own server! Had to delete and re-create the VM :pensive:, fuck!! An idiot enough not to realize that “All device traffic is routed through WARP” rather than the standard local gateway. Now, as I was bent upon using Zero Trust WARP, and with split tunnels being of no help! I proceeded with warp-cli mode proxy that establishes a tunnel for use in a SOCKS5 proxy over 127.0.0.1:40000.

To utilize this mess (yeah! I still think there could have been a better way than a damn proxy! or, maybe I’m stupid!), I fired up a WireGuard interface (say, wg1), but how the fuck am I supposed to interface it with a proxy? redsocks? privoxy? maybe, but for me? hell nah! Time to go nuts? almost! Not if you know Redirecting All Container Traffic via SOCKS Proxy using tun2socks – an excellent technique of using fwmark with iptables -t mangle! For me, it was:


#!/bin/bash

tun2socks --device tun0 --proxy socks5://127.0.0.1:40000 --interface ens4
sudo ip route add default via <IPv4_gateway_on_tun0> dev tun0 metric <METRIC> table <ROUTE_TABLE>
sudo ip rule add from <IPv4_network_on_tun0> table <ROUTE_TABLE>
sudo ip rule add fwmark <FWMARK> priority <PRIORITY> table <ROUTE_TABLE>
sudo iptables -t mangle -A PREROUTING -i wg1 -p tcp -j MARK --set-mark <FWMARK>

And, as expected, I fucked up! forgetting to allow forwarding for wg1:


#!/bin/bash

sudo iptables -A FORWARD -i wg1 -j ACCEPT

:metal: Ciao Adios!